package com.cskaoyan.shopping.converter;

import com.cskaoyan.shopping.dal.entitys.Item;
import com.cskaoyan.shopping.dto.TestProductDetailDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @auther cskaoyan
 * @date 2022/5/18:11:45
 */
@Mapper(componentModel = "spring")
public interface TestProductDetailConverter {

    @Mappings({
            @Mapping(source = "title", target = "productName"),
            @Mapping(source = "image", target = "imgUrl")
        }
    )
    TestProductDetailDto testProductDoToProductDto(Item item);
}
